package com.example.backstage.mapper;

import com.example.backstage.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Optional;


@Mapper
public interface UserMapper {

    //    @Results(
//            @Result(column = "username", property = "name")
//    )
    @Select("select * from users where name = #{name}")
    Optional<User> selectUserByName(String name);
}
